import request from "@/utils/request";

class serviceTypeAPI {
  static getServicetype(queryParams: any) {
    return request<any, PageResult<any[]>>({
      url: "/api/v1/servicetype",
      method: "get",
      params: queryParams,
    });
  }

  static addServiceType(data: any) {
    return request({
      url: "/api/v1/servicetype",
      method: "post",
      data: data,
    });
  }

  static showServiceInfo(id: any) {
    return request({
      url: `/api/v1/servicetype/${id}/form`,
      method: "get",
    });
  }

  static editServiceType(data: any) {
    return request({
      url: "/api/v1/servicetype/" + data.id,
      method: "put",
      data: data,
    });
  }

  static deleteByIds(ids: string) {
    return request({
      url: "/api/v1/servicetype/" + ids,
      method: "delete",
    });
  }
}

export default serviceTypeAPI;
